<?php
# $Id: $
$id = $template['id'];
$details = $template['details'];
$error = $template['error'];
$success = $template['success'];
require('header_nomenu.php');
require('utils.inc.php');

?>
<form method="POST" name="adminForm">
<table width="100%" class="menubar" cellpadding="0" cellspacing="0" border="0">
<? if ($success){?>
<tr>
  <td class="menudottedline" width="40%">
    <div class="pathway"><font size="2px" color="#000033"><b><?=$config['version']?></b></font></div>
  </td>
  <td class="menudottedline" align="right">
    <table cellpadding="0" cellspacing="0" border="0" id="toolbar">
      <tr height="60" valign="middle" align="center">
        <td>
          <a class="toolbar" href="#" onclick="window.close();"><img src="<?=WEB_MODULE_DIR?>images/cancel_f2.png"  align="middle" name="ok" border="0"><br>OK</a>
        </td>
      </tr>
    </table>
  </td>
</tr>
</table>
<br>
<br>
<div align="center" class="centermain">
  <div class="main">
    <table class="adminform">
      <tr>
        <td><font color ="red"><h3><?echo $success ?></h3></font></td>
      </tr>
    </table>
  </div>
<?}else{?>
<tr>
  <td class="menudottedline" width="40%">
    <div class="pathway"><font size="2px" color="#000033"><b><?=$config['version']?></b></font></div>
  </td>
  <td class="menudottedline" align="right">
    <table cellpadding="0" cellspacing="0" border="0" id="toolbar">
      <tr height="60" valign="middle" align="center">
        <td>
          <a class="toolbar" href="javascript: document.getElementById('flag').value='<?=($details) ? "Update" : "Allow"?>'; document.adminForm.submit();"><img src="<?=WEB_MODULE_DIR?>images/save_f2.png" align="middle" name="save" border="0"><br><?=($details) ? "Update" : "Allow"?>
          </a>
        </td>
        <td>
          <a class="toolbar" href="#" onclick="window.close();"><img src="<?=WEB_MODULE_DIR?>images/cancel_f2.png"  align="middle" name="cancel" border="0"><br>Not Allow</a>
        </td>
        <td>
          <a class="toolbar" href="#" onclick="window.close();"><img src="<?=WEB_MODULE_DIR?>images/cancel_f2.png"  align="middle" name="cancel" border="0"><br>Cancel</a>
        </td>
      </tr>
    </table>
      <input type="hidden" id="flag" name="flag" value="">
      <input type="hidden" name="id" value="<?=$id?>">
  </td>
</tr>
</table>
<br>
<br>
<div align="center" class="centermain">
  <div class="main">
    <table class="adminheading">
      <tr>
        <th class="edit" rowspan="2" nowrap>
          <?=($details) ? "Update Product" : "Create Permit Info"?>
        </th>
      </tr>
    </table>
    <table class="adminform">
      <tr>
        <td>Control No :</td>
        <td><input type="text" name="cntrl_no" size="30" value="<?=$details[0]['cntrl_no']?>"></td>
      </tr>
      <tr>
        <td>Permitted by :</td>
        <td><input type="text" name="p_by" size="30" value="<?=$details[0]['title']?>"></td>
      </tr>
      <tr>
        <td>Remarks :</td>
        <td><textarea name="remarks" style="width:50%" rows="5"><?=$details[0]['item_desc']?></textarea></td>
      </tr>
<?}?>
    </table>
  </div>
</form>
<?php require('footer.php');?>
